@@ -183,10 +183,6 @@ ENV['DATABASE_ADAPTER'] ||= |
||
183 | 183 |
'mysql2' |
184 | 184 |
end |
185 | 185 |
|
186 |
-if_true(on_heroku) do |
|
187 |
- gem 'rails_12factor', group: :production |
|
188 |
-end |
|
189 |
- |
|
190 | 186 |
if_true(ENV['DATABASE_ADAPTER'].strip == 'postgresql') do |
191 | 187 |
gem 'pg', '~> 0.18.3' |
192 | 188 |
end |
@@ -418,11 +418,6 @@ GEM |
||
418 | 418 |
nokogiri (~> 1.6.0) |
419 | 419 |
rails-html-sanitizer (1.0.3) |
420 | 420 |
loofah (~> 2.0) |
421 |
- rails_12factor (0.0.3) |
|
422 |
- rails_serve_static_assets |
|
423 |
- rails_stdout_logging |
|
424 |
- rails_serve_static_assets (0.0.4) |
|
425 |
- rails_stdout_logging (0.0.3) |
|
426 | 421 |
railties (5.0.0.1) |
427 | 422 |
actionpack (= 5.0.0.1) |
428 | 423 |
activesupport (= 5.0.0.1) |
@@ -663,7 +658,6 @@ DEPENDENCIES |
||
663 | 658 |
rack-livereload (~> 0.3.16) |
664 | 659 |
rails (~> 5.0.0.1) |
665 | 660 |
rails-controller-testing |
666 |
- rails_12factor |
|
667 | 661 |
rr |
668 | 662 |
rspec (~> 3.5) |
669 | 663 |
rspec-collection_matchers (~> 1.1.0) |
@@ -18,6 +18,16 @@ Huginn::Application.configure do |
||
18 | 18 |
# Apache or NGINX already handles this. |
19 | 19 |
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? |
20 | 20 |
|
21 |
+ if ENV["RAILS_LOG_TO_STDOUT"].present? || |
|
22 |
+ ENV['ON_HEROKU'] || |
|
23 |
+ ENV['HEROKU_POSTGRESQL_ROSE_URL'] || |
|
24 |
+ ENV['HEROKU_POSTGRESQL_GOLD_URL'] || |
|
25 |
+ File.read(File.join(File.dirname(__FILE__), '../../Procfile')) =~ /intended for Heroku/ |
|
26 |
+ logger = ActiveSupport::Logger.new(STDOUT) |
|
27 |
+ logger.formatter = config.log_formatter |
|
28 |
+ config.logger = ActiveSupport::TaggedLogging.new(logger) |
|
29 |
+ end |
|
30 |
+ |
|
21 | 31 |
# Compress JavaScripts and CSS |
22 | 32 |
config.assets.js_compressor = :uglifier |
23 | 33 |
config.assets.css_compressor = :sass |